FROM debian
ARG base_url=https://gitee.com/vcc-studio
EXPOSE 46
VOLUME /home/vccd/vccd
RUN  apt update && apt install -y git \
     build-essential
RUN  useradd -ms /bin/sh  vccd
WORKDIR /tmp
RUN  git clone ${base_url}/vccd && cd vccd && make && cp vccd /bin && cp -r scripts /home/vccd/
RUN apt remove git build-essential&apt autoremove
WORKDIR /home/vccd

RUN  echo "/home/vccd/vccd">/etc/vccd-runtime

CMD /bin/vccd
